/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package menusearch.ui;

import java.awt.Color;
import java.awt.Cursor;
import java.awt.event.ActionListener;
import java.util.ArrayList;
import javax.swing.JPanel;
import menusearch.logic.RecipeSearch;
import menusearch.logic.MenuSearcher;
import menusearch.db.SearchParameters;
import menusearch.json.JSONProcessor;  
import menusearch.json.RecipeSummaryList;
import menusearch.ui.RecipeSearchGetResults;

import menusearch.logic.RecipeSearch;

/**
 *
 * @author kculb820
 */

import menusearch.domain.CuisineList;
 import menusearch.json.RecipeSummaryList;
 import menusearch.json.RecipeSummary;
 import menusearch.logic.*;
 import java.awt.event.MouseAdapter;
 import java.awt.event.MouseEvent;
 import java.io.IOException;
import java.util.Iterator;
 import java.util.function.Function;
 import java.util.logging.Level;
 import java.util.logging.Logger;
import javax.swing.BorderFactory;
import javax.swing.BoxLayout;
import javax.swing.GroupLayout;
import javax.swing.JButton;
import javax.swing.JTextArea;
import javax.swing.JTextField;
    
    

public class SearchRecipePanel extends JPanel {
    private RecipeSearchGetResults resultPanel;
    /**
     * Creates new form SearchRecipePanel
     */
    
    public SearchRecipePanel() {
        initComponents();
        this.RecipePanel = resultPanel;
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        RecipePanel = new javax.swing.JPanel();
        jLabel1 = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();
        jLabel4 = new javax.swing.JLabel();
        jLabel5 = new javax.swing.JLabel();
        jLabel6 = new javax.swing.JLabel();
        jLabel7 = new javax.swing.JLabel();
        jLabel8 = new javax.swing.JLabel();
        IngreField = new javax.swing.JTextField();
        AllerField = new javax.swing.JTextField();
        DietField = new javax.swing.JTextField();
        CuiField = new javax.swing.JTextField();
        CourField = new javax.swing.JTextField();
        HoliField = new javax.swing.JTextField();
        NutriField = new javax.swing.JTextField();
        FlavField = new javax.swing.JTextField();
        ClearButton = new javax.swing.JButton();
        SearchButton = new javax.swing.JButton();
        ExitButton = new javax.swing.JButton();
        jLabel9 = new javax.swing.JLabel();
        jLabel10 = new javax.swing.JLabel();
        jLabel11 = new javax.swing.JLabel();
        jLabel12 = new javax.swing.JLabel();
        ExIngre = new javax.swing.JTextField();
        ExCui = new javax.swing.JTextField();
        ExCour = new javax.swing.JTextField();
        ExHoli = new javax.swing.JTextField();
        DetailPanel = new javax.swing.JTextField();
        jLabel13 = new javax.swing.JLabel();
        PhraseField = new javax.swing.JTextField();

        jLabel1.setText("Ingredient(s):");

        jLabel2.setText("Allergies:");

        jLabel3.setText("Diet:");

        jLabel4.setText("Cuisines:");

        jLabel5.setText("Courses:");

        jLabel6.setText("Holidays:");

        jLabel7.setText("Nutrition:");

        jLabel8.setText("Flavor:");

        IngreField.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                IngreFieldActionPerformed(evt);
            }
        });

        CuiField.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                CuiFieldActionPerformed(evt);
            }
        });

        CourField.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                CourFieldActionPerformed(evt);
            }
        });

        HoliField.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                HoliFieldActionPerformed(evt);
            }
        });

        ClearButton.setText("Clear");
        ClearButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                ClearButtonActionPerformed(evt);
            }
        });

        SearchButton.setText("Search");
        SearchButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                SearchButtonActionPerformed(evt);
            }
        });

        ExitButton.setText("Exit");
        ExitButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                ExitButtonActionPerformed(evt);
            }
        });

        jLabel9.setText("Exclude Ingredients:");

        jLabel10.setText("Exclude Cuisine:");

        jLabel11.setText("Exclude Courses:");

        jLabel12.setText("Exclude Holidays:");

        ExIngre.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                ExIngreActionPerformed(evt);
            }
        });

        ExCour.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                ExCourActionPerformed(evt);
            }
        });

        DetailPanel.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                DetailPanelActionPerformed(evt);
            }
        });

        jLabel13.setText("Phrase:");

        javax.swing.GroupLayout RecipePanelLayout = new javax.swing.GroupLayout(RecipePanel);
        RecipePanel.setLayout(RecipePanelLayout);
        RecipePanelLayout.setHorizontalGroup(
            RecipePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(RecipePanelLayout.createSequentialGroup()
                .addGap(17, 17, 17)
                .addGroup(RecipePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(RecipePanelLayout.createSequentialGroup()
                        .addComponent(ClearButton, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(SearchButton, javax.swing.GroupLayout.PREFERRED_SIZE, 119, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(ExitButton, javax.swing.GroupLayout.PREFERRED_SIZE, 116, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(RecipePanelLayout.createSequentialGroup()
                        .addGroup(RecipePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel1)
                            .addComponent(jLabel2)
                            .addComponent(jLabel3)
                            .addComponent(jLabel4)
                            .addComponent(jLabel5)
                            .addComponent(jLabel6)
                            .addComponent(jLabel8)
                            .addComponent(jLabel7)
                            .addComponent(jLabel13))
                        .addGap(26, 26, 26)
                        .addGroup(RecipePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(NutriField, javax.swing.GroupLayout.PREFERRED_SIZE, 114, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGroup(RecipePanelLayout.createSequentialGroup()
                                .addGroup(RecipePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                                    .addComponent(PhraseField, javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(FlavField, javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(HoliField, javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(CourField, javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(CuiField, javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(IngreField, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 114, Short.MAX_VALUE)
                                    .addComponent(AllerField, javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(DietField, javax.swing.GroupLayout.Alignment.LEADING))
                                .addGap(36, 36, 36)
                                .addGroup(RecipePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                    .addGroup(RecipePanelLayout.createSequentialGroup()
                                        .addGroup(RecipePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                            .addComponent(jLabel12)
                                            .addGroup(RecipePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                                .addComponent(jLabel10)
                                                .addComponent(jLabel11)))
                                        .addGap(33, 33, 33)
                                        .addGroup(RecipePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                            .addComponent(ExCui)
                                            .addComponent(ExCour)
                                            .addComponent(ExHoli, javax.swing.GroupLayout.DEFAULT_SIZE, 128, Short.MAX_VALUE)))
                                    .addGroup(RecipePanelLayout.createSequentialGroup()
                                        .addGap(1, 1, 1)
                                        .addComponent(jLabel9)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 17, Short.MAX_VALUE)
                                        .addComponent(ExIngre, javax.swing.GroupLayout.PREFERRED_SIZE, 128, javax.swing.GroupLayout.PREFERRED_SIZE)))))))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(DetailPanel, javax.swing.GroupLayout.DEFAULT_SIZE, 656, Short.MAX_VALUE)
                .addContainerGap())
        );
        RecipePanelLayout.setVerticalGroup(
            RecipePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(RecipePanelLayout.createSequentialGroup()
                .addGap(18, 18, 18)
                .addComponent(DetailPanel, javax.swing.GroupLayout.PREFERRED_SIZE, 351, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(100, Short.MAX_VALUE))
            .addGroup(RecipePanelLayout.createSequentialGroup()
                .addGap(23, 23, 23)
                .addGroup(RecipePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel13)
                    .addComponent(PhraseField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(RecipePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jLabel1)
                    .addGroup(RecipePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(IngreField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jLabel9)
                        .addComponent(ExIngre, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(RecipePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel2)
                    .addComponent(AllerField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(RecipePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel3)
                    .addComponent(DietField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(11, 11, 11)
                .addGroup(RecipePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, RecipePanelLayout.createSequentialGroup()
                        .addGroup(RecipePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(CuiField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel4)
                            .addComponent(jLabel10)
                            .addComponent(ExCui, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(RecipePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(CourField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel11)
                            .addComponent(ExCour, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addComponent(jLabel5, javax.swing.GroupLayout.Alignment.TRAILING))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(RecipePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jLabel6)
                    .addGroup(RecipePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(HoliField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jLabel12)
                        .addComponent(ExHoli, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(RecipePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jLabel7)
                    .addComponent(NutriField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(RecipePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel8)
                    .addComponent(FlavField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(RecipePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(ClearButton)
                    .addComponent(SearchButton)
                    .addComponent(ExitButton))
                .addGap(72, 72, 72))
        );

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGap(0, 0, Short.MAX_VALUE)
                .addComponent(RecipePanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(0, 0, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGap(0, 22, Short.MAX_VALUE)
                .addComponent(RecipePanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(0, 23, Short.MAX_VALUE))
        );
    }// </editor-fold>//GEN-END:initComponents

    private void IngreFieldActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_IngreFieldActionPerformed

    }//GEN-LAST:event_IngreFieldActionPerformed

    private void CuiFieldActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_CuiFieldActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_CuiFieldActionPerformed

    private void CourFieldActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_CourFieldActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_CourFieldActionPerformed

    private void HoliFieldActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_HoliFieldActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_HoliFieldActionPerformed

    private void ClearButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_ClearButtonActionPerformed
        // TODO add your handling code here:
        PhraseField.setText("");
        IngreField.setText("");
        AllerField.setText("");
        DietField.setText("");
        CuiField.setText("");
        CourField.setText("");
        HoliField.setText("");
        NutriField.setText("");
        FlavField.setText("");
        ExIngre.setText("");
        ExCui.setText("");
        ExCour.setText("");
        ExHoli.setText("");
    }//GEN-LAST:event_ClearButtonActionPerformed

    private void SearchButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_SearchButtonActionPerformed
        // TODO add your handling code here:
      //  RecipeSearch re = new RecipeSearch();

        
        String phrase, ingredient, allergy, diet, cuisine, course, holiday, nutrition, flavor, exIngredient, exCuisine, exCourse, exHoliday;
        phrase = PhraseField.getText();
        ingredient = IngreField.getText();
        allergy = AllerField.getText();
        diet = DietField.getText();
        cuisine = CuiField.getText();
        course = CourField.getText();
        holiday = HoliField.getText();
        nutrition = NutriField.getText();
        flavor = FlavField.getText();
        exIngredient = ExIngre.getText();
        exCuisine = ExCui.getText();
        exCourse = ExCour.getText();
        exHoliday = ExHoli.getText();
        //code that calls search method in recipe summary class.

     RecipeSummaryList recipeSummaries;
        Iterable<RecipeSummaryList> results = null;

        


        recipeSummaries = RecipeSearch.search(phrase, ingredient, exIngredient, 
         allergy, diet, cuisine, exCuisine, course, exCourse,
         holiday, exHoliday, nutrition, 0, 0, flavor, 100);
        
        
        
 
        if (recipeSummaries != null) {
            ArrayList<RecipeSummary> recipes = recipeSummaries.getMatches();
            for (final RecipeSummary recipeSummary : recipes) {
            
                JButton b = new JButton(recipeSummary.getId() + ": " + recipeSummary.getRecipeName());
                b.setBorderPainted(false);
                b.setForeground(Color.BLUE);
                b.setCursor(Cursor.getPredefinedCursor(12));
                b.setContentAreaFilled(false);
                b.addMouseListener(new MouseAdapter() {
                    @Override
                    public void mouseClicked(MouseEvent e) {
                        DetailPanel.removeAll();
                       String text = recipeSummary.getSourceDisplayName() + "\n";
                        CuisineList cuisineList = recipeSummary.getCusines();
                        Iterator iter = cuisineList.getIterator();
                        while(iter.hasNext()){
                            text = text + iter.next() + "\n";
                        }
                        DetailPanel.setText(text);
                        DetailPanel.revalidate();
                    }
                });
                RecipePanel.add(b);
            }
            RecipePanel.revalidate();
            
        }    

 
    }//GEN-LAST:event_SearchButtonActionPerformed

    private void ExitButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_ExitButtonActionPerformed
        // TODO add your handling code here:
        System.exit(0);
    }//GEN-LAST:event_ExitButtonActionPerformed

    private void ExIngreActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_ExIngreActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_ExIngreActionPerformed

    private void ExCourActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_ExCourActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_ExCourActionPerformed

    private void DetailPanelActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_DetailPanelActionPerformed

    }//GEN-LAST:event_DetailPanelActionPerformed

 private JPanel buildResultPanel() {

        RecipePanel = new JPanel();

        DetailPanel = new JTextField();
//DetailPanel = new JTextArea();
        RecipePanel.setLayout(new BoxLayout(RecipePanel, BoxLayout.PAGE_AXIS));

        DetailPanel.setBorder(BorderFactory.createLineBorder(Color.black));

        JPanel result = new JPanel();

        GroupLayout layout = new GroupLayout(result);

        result.setLayout(layout);

        DetailPanel.setBackground(Color.WHITE);

        layout.setHorizontalGroup(

                layout.createSequentialGroup()
                        .addGap(10)
                        .addComponent(RecipePanel, 100, 200, 400)
                        .addGap(10)
                        .addComponent(DetailPanel, 150, 250, 400)
                        .addGap(10)

        );

        layout.setVerticalGroup(
                layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(GroupLayout.Alignment.BASELINE)
                                        .addComponent(RecipePanel)
                                        .addComponent(DetailPanel)
                        )

        );

        return result;
    }

    

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JTextField AllerField;
    private javax.swing.JButton ClearButton;
    private javax.swing.JTextField CourField;
    private javax.swing.JTextField CuiField;
    private javax.swing.JTextField DetailPanel;
    private javax.swing.JTextField DietField;
    private javax.swing.JTextField ExCour;
    private javax.swing.JTextField ExCui;
    private javax.swing.JTextField ExHoli;
    private javax.swing.JTextField ExIngre;
    private javax.swing.JButton ExitButton;
    private javax.swing.JTextField FlavField;
    private javax.swing.JTextField HoliField;
    private javax.swing.JTextField IngreField;
    private javax.swing.JTextField NutriField;
    private javax.swing.JTextField PhraseField;
    private javax.swing.JPanel RecipePanel;
    private javax.swing.JButton SearchButton;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel10;
    private javax.swing.JLabel jLabel11;
    private javax.swing.JLabel jLabel12;
    private javax.swing.JLabel jLabel13;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JLabel jLabel9;
    // End of variables declaration//GEN-END:variables

    void searchBtnAddActionListener(ActionListener al) {
       SearchButton.addActionListener(al);
}
}
